// https://dart.dev/guides/language/language-tour#libraries-and-visibility
// https://dart.dev/guides/packages

// dart 库: https://pub.dev/packages
// https://pub.flutter-io.cn/packages
// https://pub.dartlang.org/flutter/

import 'package:flutter/material.dart';

class LibrariesPage extends StatefulWidget {
  final Map<String, dynamic> arguments;
  LibrariesPage({Key key, this.arguments}) : super(key: key);

  @override
  _LibrariesPageState createState() => _LibrariesPageState();
}

class _LibrariesPageState extends State<LibrariesPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('LibrariesPage'),
      ),
      body: ListView(
        children: <Widget>[
          ListTile(
            title: Text('Conception:'),
            subtitle: Text('''
- 每个 Dart 文件为一个库;
- 自定义库:
  import 'lib/xxx.dart';

- 系统库:
  import 'dart:math';
  import 'dart:convert';

- 三方库:
  pubspec.yaml

  name: codersun
  description: A new Flutter project.

  dependencies:
    flutter:
      sdk: flutter

    http: 0.12.0
    shared_preferences: ^0.5.6+3
    intl: 0.16.1

  - 使用 pub get 获取三方库;  
  - 库重名情况使用 as 指定前缀解决冲突;
  - 导入库部分功能 使用 show, 隐藏功能使用 hide;
  - 懒加载使用 deferred, 减少 APP 启动时间;
  '''),
          ),
          Divider(height: 1.0),
        ],
      ),
    );
  }
}
